﻿using System.Net;
using Daemon.Model;
using Daemon.Common;
using Microsoft.AspNetCore.Mvc;
using Daemon.Repository.Contract;
using Microsoft.AspNetCore.Http;
using Daemon.Service.Contract;
namespace DaemonAPI
{
    [ApiController]
    [Route("api/[controller]/[action]")]
    public class IMOrganizationInfoController : BaseApiController<IMOrganizationInfo, IIMOrganizationInfoRepository>
    {
        private readonly IIMOrganizationInfoService _iMOrganizationInfoService;

        public IMOrganizationInfoController(IIMOrganizationInfoRepository repository, IHttpContextAccessor httpContextAccessor, IIMOrganizationInfoService iMOrganizationInfoService) : base(repository, httpContextAccessor)
        {
            _iMOrganizationInfoService = iMOrganizationInfoService;
        }

        [HttpGet]
        [Route("")]
        public ResultModel GetOrganizationPatientInfosByType(int dataType)
        {
            return new ResultModel() { _statusCode = (int)HttpStatusCode.OK, obj = _iMOrganizationInfoService.GetOrganizationPatientInfosByType(dataType) };
        }
    }
}
